package com.hualan.sfzy.controller;

import com.hualan.sfzy.constant.CommonConstant;
import com.hualan.sfzy.service.UerCollectOederService;
import com.hualan.sfzy.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/uco")
public class UerCollectOrderController {
    @Autowired
    private UerCollectOederService uerCollectOederService;
    @GetMapping
    public Result getUerCollectOeder(@RequestParam(value = "pageNum", defaultValue = CommonConstant.PAGE_NUM_DEFAULT) Integer pageNum,
                                     @RequestParam(value = "pageSize", defaultValue = CommonConstant.PAGE_SIZE_DEFAULT) Integer pageSize,
                                     @RequestParam int userid) {

        return Result.success(uerCollectOederService.findByUerId(pageNum, pageSize, userid));
    }
}
